import React, { PureComponent } from "react"
import ThemeContext from "../../../context/theme-context"
// 类组件的context共享数据
export class Test1 extends PureComponent {
  constructor(props) {
    super(props)
  }

  render() {
    const { color } = this.context
    console.log(this.props)
    const { name, pwd } = this.props
    return (
      <h3 style={{ color: color }}>
        类孙子组件拿App传递值 ：{name}：{pwd}(不导入拿不到)
      </h3>
    )
  }
}

Test1.contextType = ThemeContext
export default Test1
